#ifndef VL_FUNCTOR_HPP
#define VL_FUNCTOR_HPP

#include "shared_ptr.hpp"

namespace vl
{

struct functor_impl_common : shared
{

};

template<typename R, typename T1>
struct functor_impl1 : functor_impl_common
{
	
};

template<typename R, typename Data>
struct functor1 : shared_ptr<functor_impl1<R, T1> >
{
	
	shared_ptr<Data> data;
	
	functor1()
	{
	}
	
	functor1(functor_impl1<R, T1>* ptr)
	: shared_ptr<functor_impl1<R, T1> >(ptr)
	{
	}
	
	R operator()()
	{
		return 
	}
};


template<typename R, typename T1>
struct functor_impl1_fptr
{
	functor1_fptr(R (*f)(T1))
	: f(f)
	{
	}
	
	virtual R run(T1 a)
	{
		return f(a);
	}
	
	R (*f)(T1);
};

}

#endif //VL_FUNCTOR_HPP